#include <iostream>
#include <string>
using std::cout;
using std::endl;
using std::string;


void test(){
    string s1("hello"); //短字符串
    string s2("sdfasdfasdfsdfasdfsdfasdf"); //长字符串
    int * pint = new int(); //堆空间
    cout << &s1 << endl;
    cout << &s2 << endl;
    cout << pint << endl; //堆空间地址

    cout << (void *)s1.c_str() << endl; //短字符串地址
    cout << (void *)s2.c_str() << endl; //长字符串地址
}

int main()
{
    test ();
    return 0;
}

